<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
	<head>
		<base href="<%=basePath %>">
		<meta charset="utf-8"/>
		<title>添加学生</title>
		<style type="text/css">
			td{width:120px}
		</style>
	</head>
	<body>
		<form action="" method="post">
			班级：<select name="class_id">
					<c:forEach items="${cs}" var="c">
						<option value="${c.cid}">${c.cname}</option>
					</c:forEach>
				</select>
				<input type="button" value="搜"/>
		</form>
		<table style="width:90%;border: 1px #FFCC66 solid; border-radius:5px" align="center" >
			<caption>学生信息列表</caption>
			<tr height="35px">
				<th width="120px">学号</th>
				<th width="80px">姓名</th>
				<th width="50px">性别</th>
				<th width="50px">年龄</th>
				<th width="150px">手机</th>
				<th width="150px">QQ</th>
				<th width="220px">地址</th>
				<th width="200px">备注</th>
				<th>操作</th>
			</tr>
			<c:forEach items="${stus}" var="s">
				<tr>
					<td>${s.stuNum}</td>
					<td>${s.stuName}</td>
					<td>${s.stuSex}</td>
					<td>${s.stuAge}</td>
					<td>${s.stuTel}</td>
					<td>${s.stuQQ}</td>
					<td>${s.stuAddr}</td>
					<td>${s.stuRemark}</td>
					<td>
						<a href="StudentDeleteServlet?snum=${s.stuNum}" onclick="javascript:return confirm('你确定删除这个可爱的学生吗？')">删除</a>
						<a href="StudentQueryServlet?snum=${s.stuNum}">修改</a>
					</td>
				</tr>
			</c:forEach>
			
			
		</table>
	
	</body>
</html>